package controller;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;

import model.BounBookUser;
import model.UserProfile;

import util.HibernateUtil;

import com.opensymphony.xwork2.ActionSupport;

public class UserController  extends ActionSupport {

	private static final long serialVersionUID = 1L;

	public List<BounBookUser> list = new ArrayList<BounBookUser>();

	public String execute() {
		
		list = HibernateUtil.list("from BounBookUser");
		
//		ProfileController p = new ProfileController();
//		for (BounBookUser user : list)
//		{
//			Collection<UserProfile> values = null;
//			try {
//				values = p.getFilledList(user.getId()).values();
//			} catch (Exception e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//			
//			UserProfile profile1 = values.iterator().next();
//			UserProfile profile2 = values.iterator().next();
//			UserProfile profile3 = values.iterator().next();
//
//			user.setShortDesc(profile1.getInputValue() + profile2.getInputValue() + "<br/>" + profile3.getInputValue());
//			
//		}
		
		return SUCCESS;
	}
	

	
}
